/*
 * Copyright (c) 2019 Nanjing Wind Information Co., Ltd. All Rights Reserved;
 * @Package wind.autotest.service.backend
 * @version 1.0.0
 * @Date 2019年4月28日
 * @author jlliu.Farrior@wind.com.cn
 */
package wind.autotest.service.backend;

import java.util.List;
import java.util.Set;

import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import wind.autotest.database.operate.CommonDao;
import wind.autotest.pojo.TestField;
import wind.autotest.pojo.TestTable;
import wind.autotest.service.frontend.TestFieldService;
import wind.autotest.service.frontend.TestTableService;

/**
 * @Description: <样本操作>
 * @author jlliu.Farrior@wind.com.cn
 * @Date 2019年4月28日 下午8:00:49
 * 
 */
@Service
public class EtlService {
	@Autowired
	private TestTableService testTableService;
	@Autowired
	private TestFieldService testFieldService;
	@Autowired
	private CommonDao commonDao;

	public String getMainTable(String taskId) {
		
		
		return null;
	}
	
	/**
	 * 
	 * 功能描述:<根据样本记录ID获取样本数据>
	 * @param rowIds
	 * @param taskId
	 * @return 
	 * @author jlliu.Farrior
	 */
	public Set<String> getDataByRowIds(List<String> rowIds, String taskId) {
		if (CollectionUtils.isEmpty(rowIds)) {
			return null;
		}
		// 获取样本主表字段信息
		TestTable testTable = testTableService.findMainTable(Integer.valueOf(taskId));
		String tableName = testTable.getName();
		int tableId = testTable.getId();
		
		List<TestField> testFields = testFieldService.findBussKeyFields(tableId);
		
		
		for (String rowid : rowIds) {
			
		}
		return null;
	}
	
}
